<{include file="common/header.tpl"}>
<style>
table.gridtable {
    font-family: verdana,arial,sans-serif;
    font-size:11px;
    color:#333333;
    border-width: 1px;
    border-color: #666666;
    border-collapse: collapse;
    min-width:70%;
}
table.gridtable th {
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #666;
    background-color: #428bca;
    color: #eee;
}
table.gridtable th a{
    color:#fff;
}
.table.gridtable>thead>tr>th{
    border-bottom:0;
}
.table>thead:first-child>tr:first-child>td{
    border-top:1px solid #aaa;
}
table.gridtable td {
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #aaa;
    background-color: #ffffff;
}
</style>
<section id="spread_one" class="column">

        <article class="module width_3_quarter">
        <header>
            <h3 class="tabs_involved " style="width: 350px">CPPA每日数据汇总  <a href="/superdata/excel_cppa" target="_blank">【导出手机新增数】</a></h3>
        </header>
                                                                                  <header>
        <div class="">
    <span class="fw" style="font-family:'黑体'">&nbsp;</span>&nbsp;&nbsp;从&nbsp;&nbsp;<input type="text" value="<{$start_date}>" id="date1" name='start_date' /> &nbsp;至 
	&nbsp;<input type="text" value="<{$end_date}>" id="date2" name='end_date'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input class="daily-update" id ="daily-update" type='submit' value='查询'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="/superdata/cppa/3" >【三天新增数】</a>
        <a href="/superdata/cppa/7" >【七天新增数】</a>
        <a href="/superdata/cppa/30">【30天新增数】</a>
    
        </div>
                       
                        </header>
		<div class="tab_container">
			<div id="tab1" class="tab_content">
                            <div style="overflow-x:scroll;">
                 
			<table  class="gridtable"> 
			<thead> 
				<tr> 
   					
    				<th  width="50">渠道名称</th> 
                                <{foreach from = $daily.days key="sday" item = 'day'}> 
    				<th  width="30"><{$day}></th> 
                                <{/foreach}>
                                <th width="30">日均</th> 
                                <th width="30">总计</th> 
				</tr> 
                                
			</thead> 
			<tbody>
				<{foreach from = $daily.list key="key" item = 'days'}> 
                                   
					<tr>
                                                <{if $key==""}>
                                                <td>------</td>
                                                <{else}>
                                                <td><{$key}></td>
                                                <{/if}>
						<{foreach from = $days key="sday" item = 'item'}> 
                                                 <{if $sday!="sum"&&$sday!="average"}>
                                                    <{if $item==null}>
                                                    <td>0</td>
                                                    <{else}>
                                                    <td><a href="/superdata/cppa_daily/<{$item.day}>/<{$item.uid}>"><{$item.imei}></a></td> 
                                                    <{/if}>
                                                <{/if}>
                                                <{/foreach}>
                                                <td><{$days.average}></td>
                                                <td><{$days.sum}></td>
					</tr> 
				<{/foreach}>
                                 <tr>
                                    <th width="50">合计：</th>
                                    <{foreach from=$daily.sum item=day }>
                                        <th width="30"><{$day}></th>
                                    <{/foreach}>
                                </tr>
			</tbody> 
			</table>
                            </div>
			</div><!-- end of #tab1 -->
                        
		</div><!-- end of .tab_container -->
                <div><{$pagination}></div>
		</article><!-- end of content manager article -->
		<div class="clear"></div>
                
	</section>	
<script>
        $('#daily-update').click(function() {
        var start_date = $('#date1').val();
        var end_date   = $('#date2').val();
        window.location.href ="/superdata/cppa?start_date="+ start_date + "&end_date=" + end_date;
        });
</script>
<{include file="common/footer.tpl"}>
